this.handler = function(){
	
	this.get = function(){
		var userCookie = request.getCookieValue(constants.get("loginCookieKey"));
		if(userCookie){
			var userObj = storage.users.getSingle({cookie: userCookie});
			if(userObj){
				var user = userObj.value;
				user.cookie = null;
				storage.users.updateById(user.username, user);
				response.setCookie({
					name: constants.get("loginCookieKey"), 
					path: "/",
					value: null, 
					expires: 0
				});
			}
		}
		response.redirect("/");
		
	}
	
	this.post = function(){
		this.get();
	}
	
	
}